<?php
require './include.php';
$data = require './data.php';
$config = array(
		'app_id' => $data['app_id'],
		'app_secret' => $data['app_secret'],
);
$url = $_GET['url']?urldecode($_GET['url']):exit(500);
require_once  __DIR__ . "/wechat/jssdk.php";
@$jssdk = new JSSDK($config['app_id'], $config['app_secret']);
@$signPackage = $jssdk->GetSignPackage($url);
$link = "http://{$data['d4']}/?xxid=1&xxsfile=".get_random_str(32).".html#_t=".time()*3;
$jsondata = array(
		"debug"=> false,
		"appId"=>$signPackage['appId'],
		"signature"=>$signPackage['signature'],
		"timestamp"=>$signPackage['timestamp'],
		"nonceStr"=>$signPackage['nonceStr']
);
exit(json_encode($jsondata));